﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EdTarea.ascx.cs" Inherits="SistemaWeb.Editores.EdTarea" %>
<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>


<ext:Store runat="server" ID="PrioridadesStore">          
    <Reader>
        <ext:JsonReader ReaderID="id">
            <Fields>
                <ext:RecordField Name="id" />
                <ext:RecordField Name="descripcion" />
            </Fields>
        </ext:JsonReader>
    </Reader>
</ext:Store>
<ext:Store runat="server" ID="PerfilesStore">          
    <Reader>
        <ext:JsonReader ReaderID="id2">
            <Fields>
                <ext:RecordField Name="id" />
                <ext:RecordField Name="descripcion" />
            </Fields>
        </ext:JsonReader>
    </Reader>
</ext:Store>
<ext:Store runat="server" ID="SenioritiesStore">          
    <Reader>
        <ext:JsonReader ReaderID="id">
            <Fields>
                <ext:RecordField Name="id" />
                <ext:RecordField Name="descripcion" />
            </Fields>
        </ext:JsonReader>
    </Reader>
</ext:Store>
<ext:Store runat="server" ID="ComplejidadStore">          
    <Reader>
        <ext:JsonReader ReaderID="id">
            <Fields>
                <ext:RecordField Name="id" />
                <ext:RecordField Name="descripcion" />
            </Fields>
        </ext:JsonReader>
    </Reader>
</ext:Store>
<ext:Store runat="server" ID="EstadoStore">          
    <Reader>
        <ext:JsonReader ReaderID="id">
            <Fields>
                <ext:RecordField Name="id" />
                <ext:RecordField Name="descripcion" />
            </Fields>
        </ext:JsonReader>
    </Reader>
</ext:Store>
<ext:Store runat="server" ID="TipoStore">          
    <Reader>
        <ext:JsonReader ReaderID="id">
            <Fields>
                <ext:RecordField Name="id" />
                <ext:RecordField Name="descripcion" />
            </Fields>
        </ext:JsonReader>
    </Reader>
</ext:Store>

<ext:Window ID="popupEditor" runat="server" Collapsible="true" 
            Icon="ApplicationEdit" Title="Editor de Tareas" 
            Width="400" Height="400" AutoShow="true" Modal="true" ShowOnLoad="false">
    <Body>
        <ext:FitLayout runat="server">
            <ext:TabPanel ID="TabPanel1" runat="server" ActiveTabIndex="0" Height="300">
                <Tabs>
                    <ext:Tab ID="TabTarea" runat="server" Title="Tarea" Icon="Vcard" BodyStyle="padding:10px;" AutoDataBind="true">
                        <Body>
                            <ext:FormLayout ID="FormLayout1" runat="server">
                                <Anchors>
                                    <ext:Anchor>
                                        <ext:TextField ID="idTB" ReadOnly="true" runat="server" FieldLabel="ID" Width="250">
                                        </ext:TextField>
                                    </ext:Anchor>
                                    <ext:Anchor>
                                        <ext:TextField ID="nombreTB" runat="server" FieldLabel="Tarea" Width="250">
                                        </ext:TextField>
                                    </ext:Anchor>
                                    <ext:Anchor>
                                        <ext:DateField 
                                            ID="fechaCreacionTB" 
                                            runat="server" 
                                            FieldLabel="Fecha Creacion" 
                                            Format="dd-MMM-yyyy"
                                            Width="250"
                                            />
                                    </ext:Anchor>
                                    <ext:Anchor>
                                        <ext:TextArea 
                                            ID="descripcionTA" 
                                            runat="server" 
                                            FieldLabel="Descripcion" 
                                            Height="200" 
                                            Width="250"
                                            />
                                    </ext:Anchor>
                                </Anchors>
                            </ext:FormLayout>
                        </Body>
                    </ext:Tab>
                    <ext:Tab ID="TabCaracteristicas" runat="server" Title="Caracteristicas" Icon="VcardAdd" BodyStyle="padding:5px;  AutoDataBind="true">
                        <Body>
                            <ext:FormLayout ID="FormLayout2" runat="server">                                
                                <Anchors>
                                    <ext:Anchor>                                    
                                    <ext:ComboBox ID="prioridadDL" runat="server" 
                                        StoreID="PrioridadesStore"                                        
                                        FieldLabel="Prioridad"
                                        AllowBlank="true"                                                                          
                                        DisplayField="descripcion"
                                        ValueField="id" 
                                        TypeAhead="true"
                                        Mode="Local" 
                                        ForceSelection="true" 
                                        TriggerAction="All" 
                                        EmptyText="Seleccione Prioridad..."
                                        Width="250" />
                                    </ext:Anchor>
                                    <ext:Anchor>
                                        <ext:ComboBox ID="perfilDL" runat="server" 
                                        StoreID="PerfilesStore"                                        
                                        FieldLabel="Perfil"
                                        AllowBlank="false" 
                                        DisplayField="descripcion" 
                                        ValueField="id" 
                                        TypeAhead="true"
                                        Mode="Local" 
                                        ForceSelection="true" 
                                        TriggerAction="All" 
                                        EmptyText="Seleccione Perfil..."
                                        Width="250" />
                                    </ext:Anchor>
                                    <ext:Anchor>
                                        <ext:ComboBox ID="seniorityDL" runat="server" 
                                        StoreID="SenioritiesStore"                                        
                                        FieldLabel="Seniority"
                                        AllowBlank="false" 
                                        DisplayField="descripcion" 
                                        ValueField="id" 
                                        TypeAhead="true"
                                        Mode="Local" 
                                        ForceSelection="true" 
                                        TriggerAction="All" 
                                        EmptyText="Seleccione Seniority..."
                                        Width="250" />
                                    </ext:Anchor>
                                    <ext:Anchor>
                                        <ext:ComboBox ID="complejidadDL" runat="server" 
                                        StoreID="ComplejidadStore"                                        
                                        FieldLabel="Complejidad"
                                        AllowBlank="false" 
                                        DisplayField="descripcion" 
                                        ValueField="id" 
                                        TypeAhead="true"
                                        Mode="Local" 
                                        ForceSelection="true" 
                                        TriggerAction="All" 
                                        EmptyText="Seleccione Complejidad..."
                                        Width="250" />
                                    </ext:Anchor>
                                    <ext:Anchor>
                                        <ext:ComboBox ID="estadoDL" runat="server" 
                                        StoreID="EstadoStore"                                        
                                        FieldLabel="Estado"
                                        AllowBlank="false" 
                                        DisplayField="descripcion" 
                                        ValueField="id" 
                                        TypeAhead="true"
                                        Mode="Local" 
                                        ForceSelection="true" 
                                        TriggerAction="All" 
                                        EmptyText="Seleccione Estado..."
                                        Width="250" />
                                    </ext:Anchor>
                                    <ext:Anchor>
                                        <ext:ComboBox ID="tipoDL" runat="server" 
                                        StoreID="TipoStore"                                        
                                        FieldLabel="Tipo"
                                        AllowBlank="false" 
                                        DisplayField="descripcion" 
                                        ValueField="id" 
                                        TypeAhead="true"
                                        Mode="Local" 
                                        ForceSelection="true" 
                                        TriggerAction="All" 
                                        EmptyText="Seleccione Tipo..."
                                        Width="250" />
                                    </ext:Anchor>
                                </Anchors>
                            </ext:FormLayout>
                        </Body>
                    </ext:Tab>
                </Tabs>
            </ext:TabPanel>
        </ext:FitLayout>
    </Body>
    <Buttons>
        <ext:Button ID="SaveButton" runat="server" Text="Save" Icon="Disk">
            <AjaxEvents>
                <Click OnEvent="Guardar" Failure="Ext.MessageBox.alert('Saving failed', 'Error during ajax event');">
                    <EventMask ShowMask="true" Target="CustomTarget" CustomTarget="={#{popupEditor}.body}" />
                </Click>
            </AjaxEvents>
        </ext:Button>
        <ext:Button ID="CancelButton" runat="server" Text="Cancel" Icon="Cancel">
            <Listeners>
                <Click Handler="#{popupEditor}.hide();" />
            </Listeners>
        </ext:Button>
    </Buttons>
</ext:Window>




